<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core">

<ui:composition template="/WEB-INF/layout/layout.xhtml">
    <ui:define name="title">Mi cuenta</ui:define>
    <ui:define name="content">
    	<h2><h:outputLabel value="Mi cuenta"/></h2>
        <h:panelGroup layout="block" style="background:#d4f1d4;padding:10px;">
            #{accountController.checkPermissions}
            <h:panelGroup layout="block" style="font-weight:bold;">
                Usuario: #{authController.user.firstName} #{authController.user.lastName}
            </h:panelGroup>
            <h:panelGroup layout="block">
                <h:panelGroup layout="block" style="font-weight:bold;padding-top:5px;padding-bottom:5px;">Mis permisos:</h:panelGroup>
                <ul>
                    <ui:repeat value="#{authController.user.roles}" var="role">
                        <ui:repeat value="#{role.permissions}" var="perm">
                            <div style="padding-left:10px;">#{perm.description}</div>
                        </ui:repeat>
                    </ui:repeat>
                </ul>
            </h:panelGroup>
        </h:panelGroup>
    </ui:define>
</ui:composition>
</html>